Skip to content

Conversation

@edgarfgp
Copy link
Member

@edgarfgp edgarfgp commented May 17, 2024

module ItemsControlPage =
    type Crockery = { Title: string; Number: int }

    let items = [ for i in 1..1000 -> { Title = "dinner plate"; Number = i } ]

    let view () =

        VStack() {
            TextBlock("List of crockery:")

            ItemsControl(
                items,
                fun item ->
                    HStack() {
                        TextBlock(item.Title)
                        TextBlock(item.Number.ToString())
                    }
            )
                .itemsPanel(VirtualizingStackPanel())
        }

@edgarfgp edgarfgp marked this pull request as ready for review May 17, 2024 13:00
@edgarfgp edgarfgp merged commit a256fb4 into main May 17, 2024
@edgarfgp edgarfgp deleted the items-control branch May 17, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants